package org.linlinjava.litemall.wx.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("新优惠券VO")
public class WxHomeIndexVO implements Serializable {

    @ApiModelProperty(value = "策略ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long styategyId;
    @ApiModelProperty(value = "优惠券ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long couponId;
    @ApiModelProperty(value = "优惠券名称")
    private String couponName;
    @ApiModelProperty(value = "优惠券图片")
    private String pictureUrl;
    @ApiModelProperty(value = "折扣类型(1:满减;2:百分比)")
    private Integer discountType;
    @ApiModelProperty(value = "折扣类型｜百分比")
    private BigDecimal discountRate;
    @ApiModelProperty(value = "折扣类型｜优惠金额")
    private BigDecimal discount;
    @ApiModelProperty(value = "至少需要消费的额度")
    private BigDecimal min;
    @ApiModelProperty(value = "用户限领数量")
    private Integer userLimit;
    @ApiModelProperty(value = "有效时间限制，如果是0，则基于领取时间的有效天数days；如果是1，则start_time和end_time是优惠券有效期")
    private Integer timeType;
    @ApiModelProperty(value = "过期类型｜按天")
    private Integer days;
    @ApiModelProperty(value = "过期类型｜开始时间")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "过期类型｜结束时间")
    private LocalDateTime endTime;
    @ApiModelProperty(value = "是否展示优惠区")
    private Integer isShow;
    //当前用户已领取的数
    @ApiModelProperty(value = "当前用户已领取的数｜如果没有登陆用户返回null")
    private Long pullNum;
    //使用说明 规则
    @ApiModelProperty(value = "使用说明 规则｜后台填写的一些信息")
    private String useInstruction;

}
